import productIndex from "@/views/product/index.vue";
import detail from "@/views/product/detail.vue";
import customer from "@/views/product/customer.vue"

// 子路由列表
const routes = [
    {
        name:"productIndex",
        path:"index",
        component:productIndex,
        meta:{login:false}
    },
    {
        name:"detail",
        path:"detail",
        component:detail,
        meta:{login:false}
    },
    {
        name:"customer",
        path:"customer",
        component:customer,
        meta:{login:true}
    }
]

// 创建父路由
const parentRouter = {
    template:"<router-view></router-view>"
}
// 抛出节点路由
export default [{
    name:"product",
    path:"/product",
    component:parentRouter,
    children:routes
}]